require "gosu.so"




class String
  def subVars!
  #  gsub!("%building_sprite_root%",MapImage::BuildingSpriteRoot)
  #  gsub!("%item_sprite_root%",MapImage::ItemSpriteRoot)
  #  gsub!("%terrain_sprite_root%",MapImage::TerrainSpriteRoot)
  #  gsub!("%map_root%",Map::Root)
  #  gsub!("%materials_root%",Material::Root)
  #  gsub!("%sprite_root%",Material::SpriteRoot)

    ########
    
    gsub!("%root%", $appdir)
    gsub!("%app_root%", $appdir)
    gsub!("%program_root%", $appdir)
    
    gsub!("%item_sprites%", "img/sprites/map/items")
    gsub!("%item_icons%", "img/sprites/icons")
    gsub!("%char_sprites%", "img/sprites/chars")
    gsub!("%terrain_sprites%", "data/sprites/map/terrain")
    gsub!("%building_sprites%", "data/sprites/map/building")
    
    gsub!("%ruby_scripts%", "scripts/ruby/scripts")
    gsub!("%ruby_plugins%", "scripts/ruby/plugins")
    gsub!("%ruby_scriptlib%", "scripts/ruby/lib")
    gsub!("%ruby_scriptstdlib%", "scripts/ruby/lib/stdlib")
    gsub!("%ruby_startup_scripts%", "scripts/ruby/startup")
    gsub!("%text_scripts%", "scripts/text/scripts")

    gsub!("%npcs%", "data/characters/npcs")
    gsub!("%ai%", "data/characters/npcs/ai")
    gsub!("%players%", "data/characters/players")
    gsub!("%actions%", "data/characters/actions")

    gsub!("%map_materials%", "data/materials")
    gsub!("%materials%", "data/materials") #subject to change

    gsub!("%maps%", "data/maps")
    
    #gsub!("%level%", $window.currentLevel.to_s)
    #gsub!("%player%", $window.player.name)
    return self
  end
end
